home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
misc1
/
lpdos.zip
/
LPBATCH.LPB
< prev
next >
Wrap
Text File
|
1992-01-10
|
3KB
|
102 lines
' Batch File demo for L/P Dos
:BeginBatchDemo
echo Clearing all variables (except for "%%P").
' Here's a good example of the FOR command and one type of set
' that can be used with it.
' What the following FOR command does is execute a CLEAR command
' with each of the variable names substitued, one each pass.
for %%a (b c d e f g h i j k l m n o q r s t u v w x y z) clear %%a
' And finally, since A was used as a substitution variable, clear it
clear a
cls
Echo Batch Demo In Progress...
' If picture variable is empty don't load pic..
If ^%p^=^^ goto NoPic
set s PicShow
Echo Loading a picture...
picsize 2880 2880
picpos 300 300
spic %p|Batch Demo
:NoPic
pause Click OK to begin.|Batch Demo
hpic
norm
pause Click OK to minimize the window.|Batch Demo
min
pause Click OK to maximize the window.|Batch Demo
max
cls
Echo The Saver command does 3 things.
Echo
Echo 1. By itself, I.E. "SAVER"
Echo It starts Saver.
Echo 2. With a question mark "?" "SAVER ?"
Echo It shows the saver time.
Echo 3. Or with a number, "SAVER 300"
echo Sets the Saver delay time.
clear g
yesno Start Saver Demo?|Batch Demo|set g dosaver
if ^%g^=^^ goto NoSaver
pause When you get tired of Saver, press a key or move your mouse.|Batch Demo
saver
:NoSaver
cls
type var1.txt
pause Click OK to continue.|Batch Demo
cls
type var2.txt
pause Click OK to Continue.|Batch Demo
help
Pause Click OK to close the Help window.|Batch Demo
-help
dir
dirs
Pause In the next dialog box select an App, then Click OK.|Batch Demo
show
pause Click OK continue.|Batch Demo
' GRABWIN sets the input focus back to us, if we lost it..
grabwin
input Enter the name of a text file to edit.|Batch Demo|%%e
if ^%E^=^^ goto NoEdit
edit %e
pause Click OK to return to Batch Demo|Batch Demo
grabwin
:NoEdit
cls
echo MSGBOX takes 4 parameters:
echo MessageString, a prompt.
echo Buttons, what buttons and/or icon you want.
echo Title, Dialog box caption.
echo %%Variable, what variable you want the return value in.
echo After the message box is displayed, the variable you
echo specified will contain the number of the button selected.
echo
echo Example: MSGBOX Click a button|274|Batch Demo|%%r
MsgBox Click a button to continue.|274|Batch Demo|%%r
pause You chose %r.|Batch Demo
cls
ver
if ^%s^=^PicShow^ goto EndDemo
echo
echo To see the Picture commands in action:
echo
echo Type:
echo SET P picturename
echo
echo Where picturename=the filename of a bitmap, icon or metafile.
echo Then start this batch file again.
echo
clear r
:EndDemo
msgbox Run Batch Demo Again?|36|Batch Demo|%%r
if ^%r^=^Yes^ goto BeginBatchDemo
echo Batch Demo Complete..